unit Reguleringu;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Spin, StdCtrls, Buttons, ExtCtrls;

type
  TfrmRegulering = class(TForm)
    gpbPHindstillinger: TGroupBox;
    SpeedButton1: TSpeedButton;
    gpbRegMeth: TGroupBox;
    btnpH: TSpeedButton;
    btnTemp: TSpeedButton;
    btnOxygen: TSpeedButton;
    btnFeed: TSpeedButton;
    btnLight: TSpeedButton;
    btnAlt1: TSpeedButton;
    btnAlt2: TSpeedButton;
    gpbRegpH: TGroupBox;
    gpbActive: TGroupBox;
    gpbTRpH: TGroupBox;
    speOOpH: TSpeedButton;
    speDPpH: TSpeedButton;
    spePIDph: TSpeedButton;
    speFBpH: TSpeedButton;
    gpbSetpoints: TGroupBox;
    gpbDPrest: TGroupBox;
    gpbTempSettings: TGroupBox;
    SpeedButton2: TSpeedButton;
    gpbRegTemp: TGroupBox;
    GroupBox6: TGroupBox;
    SpeedButton3: TSpeedButton;
    SpeedButton4: TSpeedButton;
    SpeedButton5: TSpeedButton;
    SpeedButton6: TSpeedButton;
    GroupBox8: TGroupBox;
    Label5: TLabel;
    GroupBox9: TGroupBox;
    Label6: TLabel;
    edtTEMPsetpoint: TEdit;
    edtTempTidsforsinkelse: TEdit;
    edtTidsforsinkelse: TEdit;
    lblPHtidsforsinkelse: TLabel;
    edtPHTimerInterval: TEdit;
    lblpHvolumen: TLabel;
    edtPHsyreTimerInterval: TEdit;
    lblVolumenSyre: TLabel;
    lblPHsetpoint: TLabel;
    edtPHsetpoint: TEdit;
    edtPHMaxSetpoint: TEdit;
    lblMaxSetpointPH: TLabel;
    gpbFeedSettings: TGroupBox;
    SpeedButton7: TSpeedButton;
    GroupBox10: TGroupBox;
    gpbRegFeed: TGroupBox;
    GroupBox17: TGroupBox;
    speFeedOO: TSpeedButton;
    speFeedDP: TSpeedButton;
    SpeedButton10: TSpeedButton;
    SpeedButton11: TSpeedButton;
    gpbFeedDPSet: TGroupBox;
    gpbFeedDPA: TGroupBox;
    lblMetSetpoint: TLabel;
    edtMetSetpoint: TEdit;
    gpbFeedOOSet: TGroupBox;
    edtMetTimerInterval: TEdit;
    lblMetVolumen: TLabel;
    edtMetTidsforsinkelse: TEdit;
    lblMetTidsforsinkelse: TLabel;
    gpbFeedOOA: TGroupBox;
    lblFlow: TLabel;
    edtFlowHastighed: TEdit;
    gpbOxySettings: TGroupBox;
    SpeedButton12: TSpeedButton;
    gpbRegOxy: TGroupBox;
    GroupBox19: TGroupBox;
    SpeedButton13: TSpeedButton;
    SpeedButton14: TSpeedButton;
    SpeedButton15: TSpeedButton;
    SpeedButton16: TSpeedButton;
    gpbIltIndstillinger: TGroupBox;
    lblIltKp: TLabel;
    lblIltTidsforsinkelse: TLabel;
    lblIltNormalOutput: TLabel;
    lblMinRPM: TLabel;
    lblMaxRPM: TLabel;
    edtIltKp: TEdit;
    edtIltTidsforsinkelse: TEdit;
    edtIltNormalOutput: TEdit;
    edtRPMmin: TEdit;
    edtRPMmax: TEdit;
    gpbLigSettings: TGroupBox;
    SpeedButton17: TSpeedButton;
    GroupBox18: TGroupBox;
    gpbRegLig: TGroupBox;
    GroupBox22: TGroupBox;
    SpeedButton18: TSpeedButton;
    SpeedButton19: TSpeedButton;
    SpeedButton20: TSpeedButton;
    SpeedButton21: TSpeedButton;
    gpbAlt1Settings: TGroupBox;
    SpeedButton22: TSpeedButton;
    gpbOpt1: TGroupBox;
    grbOpt1_typeReg: TGroupBox;
    gpbAlt2Settings: TGroupBox;
    SpeedButton27: TSpeedButton;
    edtFeedOODelay: TEdit;
    Label19: TLabel;
    edtILTTi: TEdit;
    edtILTTd: TEdit;
    lblIltTi: TLabel;
    lblILTTd: TLabel;
    grpIltSetpoint: TGroupBox;
    edtILTsetpointMin: TEdit;
    lblILTsetpoint: TLabel;
    cbIltKp: TCheckBox;
    cbIltTi: TCheckBox;
    cbIltTd: TCheckBox;
    btnIltAdv: TButton;
    grbOpt1_OnOf_setpoints: TGroupBox;
    grbOpt1_OnOf_parameters: TGroupBox;
    lblOpt1_onof_timedelay: TLabel;
    edtOpt1_onof_timedelay: TEdit;
    grbOpt1_DoPa_parameters: TGroupBox;
    lblOpt1_DoPa_RegPause: TLabel;
    lblOpt1_DoPa_DoseSize: TLabel;
    edtOpt1_DoPa_RegPause: TEdit;
    edtOpt1_DoPa_DoseSize: TEdit;
    grbOpt1_DoPa_setpoints: TGroupBox;
    grbOpt1_PID_parameters: TGroupBox;
    lblOpt1_PID_kp: TLabel;
    lblOpt1_PID_timedelay: TLabel;
    lblOpt1_PID_normal: TLabel;
    lblOpt1_PID_minvalue: TLabel;
    lblOpt1_PID_maxvalue: TLabel;
    lblOpt1_PID_ti: TLabel;
    lblOpt1_PID_td: TLabel;
    edtOpt1_PID_kp: TEdit;
    edtOpt1_PID_TimeDelay: TEdit;
    edtOpt1_PID_normal: TEdit;
    edtOpt1_PID_maxvalue: TEdit;
    edtOpt1_PID_minvalue: TEdit;
    edtOpt1_PID_ti: TEdit;
    edtOpt1_PID_td: TEdit;
    cbOpt1_PID_kp: TCheckBox;
    cbOpt1_PID_ti: TCheckBox;
    cbOpt1_PID_td: TCheckBox;
    btnOpt1_PID_AdvSet: TButton;
    grbOpt1_PID_setpoint: TGroupBox;
    lblOpt1_PID_setpoints: TLabel;
    edtOpt1_PID_setpoints: TEdit;
    grbOpt1_Feedback_parameters: TGroupBox;
    grbOpt1_Feedback_setpoints: TGroupBox;
    speOpt1_typeReg_OnOf: TSpeedButton;
    speOPt1_typeReg_DoPa: TSpeedButton;
    speOpt1_TypeReg_PID: TSpeedButton;
    speOpt1_TypeReg_Feed: TSpeedButton;
    edtOpt1_Feedback_parameters_normal: TEdit;
    edtOpt1_Feedback_parameters_IncrementsSize: TEdit;
    lblOpt1_Feedback_parameters_normal: TLabel;
    lblOpt1_Feedback_parameters_IncrementSize: TLabel;
    gpbRegAlt2: TGroupBox;
    grbOpt2_PID_setpoint: TGroupBox;
    lblOpt2_PID_setpoint: TLabel;
    edtOpt2_PID_setpoint: TEdit;
    grbOpt2_typereg: TGroupBox;
    speOpt2_typereg_onof: TSpeedButton;
    speOpt2_typereg_dopa: TSpeedButton;
    speOpt2_typereg_PID: TSpeedButton;
    speOpt2_typereg_feedback: TSpeedButton;
    grbOpt2_PID_parameters: TGroupBox;
    lblOpt2_PID_parameters_kp: TLabel;
    lblOpt2_PID_parameters_timedelay: TLabel;
    lblOpt2_PID_parameters_normal: TLabel;
    lblOpt2_PID_parameters_minvalue: TLabel;
    lblOpt2_PID_parameters_maxvalue: TLabel;
    lblOpt2_PID_parameters_ti: TLabel;
    lblOpt2_PID_parameters_td: TLabel;
    edtOpt2_PID_parameters_kp: TEdit;
    edtOpt2_PID_parameters_timedelay: TEdit;
    edtOpt2_PID_parameters_normal: TEdit;
    edtOpt2_PID_parameters_maxvalue: TEdit;
    edtOpt2_PID_parameters_minvalue: TEdit;
    edtOpt2_PID_parameters_ti: TEdit;
    edtOpt2_PID_parameters_td: TEdit;
    chOpt2_PID_parameters_kp: TCheckBox;
    chOpt2_PID_parameters_ti: TCheckBox;
    chOpt2_PID_parameters_td: TCheckBox;
    btnOpt2_PID_parameters_adv: TButton;
    grbOpt2_onof_parameter: TGroupBox;
    lblOpt2_onof_parameter_timedelay: TLabel;
    edtOpt2_onof_parameter_timedelay: TEdit;
    grbOpt2_onof_setpoints: TGroupBox;
    grbOpt2_dopa_parameters: TGroupBox;
    lblOpt2_dopa_parameters_pause: TLabel;
    lblOpt2_dopa_parameters_dosesize: TLabel;
    edtOpt2_dopa_parameters_pause: TEdit;
    edtOpt2_dopa_parameters_dosesize: TEdit;
    grbOpt2_dopa_setpoints: TGroupBox;
    grbOpt2_Feedback_setpoint: TGroupBox;
    grbOpt2_Feedback_Parameters: TGroupBox;
    lblOpt2_Feedback_parameters_normal: TLabel;
    lblOpt2_Feedback_parameters_CriticalFeed: TLabel;
    lblOpt2_Feedback_parameters_IncrementSize: TLabel;
    edtOpt2_Feedback_parameters_normal: TEdit;
    edtOpt2_Feedback_parameters_CriticalFeed: TEdit;
    edtOpt2_Feedback_parameters_IncrementsSize: TEdit;
    Label21: TLabel;
    cboOpt2_Feedback_setpoints_GreatLess: TComboBox;
    edtOpt2_Feedback_setpoint: TEdit;
    Label20: TLabel;
    Label18: TLabel;
    cboOpt2_DoPa_setpoints_GreatLess: TComboBox;
    edtOpt2_dopa_setpoints: TEdit;
    Label17: TLabel;
    Label15: TLabel;
    cboOpt2_OnOf_setpoints_GreatLess: TComboBox;
    edtOpt2_onof_setpoints: TEdit;
    Label16: TLabel;
    lblOpt1_Feedback_setpoint_text2: TLabel;
    edtOpt1_Feedback_setpoint: TEdit;
    cboOpt1_Feedback_setpoint_GreatLess: TComboBox;
    lblOpt1_Feedback_setpoint_text1: TLabel;
    lblOpt1_OnOf_setpoint_text2: TLabel;
    edtOpt1_OnOf_setpoint: TEdit;
    cboOpt1_OnOf_setpoint_GreatLess: TComboBox;
    lblOpt1_OnOf_setpoint_text1: TLabel;
    lblOpt1_DoPa_setpoint_text2: TLabel;
    edtOpt1_DoPa_setpoints: TEdit;
    cboOpt1_DoPa_setpoint_GreatLess: TComboBox;
    lblOpt1_DoPa_setpoint_text1: TLabel;
    grbLight_parameters: TGroupBox;
    Label22: TLabel;
    Label25: TLabel;
    edtLight_parameters_normal: TEdit;
    edtLight_parameters_IncrementSize: TEdit;
    grbLight_setpoints: TGroupBox;
    gpbOvervaagningPH: TGroupBox;
    radOVPHOn: TRadioButton;
    radOVPHoff: TRadioButton;
    gpbReguleringPH: TGroupBox;
    radPHoff: TRadioButton;
    radPHon: TRadioButton;
    lblPHrel: TLabel;
    sedPHrel: TSpinEdit;
    lblPHchannel: TLabel;
    sedPHchannel: TSpinEdit;
    gpbReguleringSyre: TGroupBox;
    lblRelSyre: TLabel;
    SpeedButton23: TSpeedButton;
    radPHsyreOff: TRadioButton;
    radPHsyreON: TRadioButton;
    sedPHsyreRel: TSpinEdit;
    sbtnpH_Calibration_input: TSpeedButton;
    SpeedButton9: TSpeedButton;
    GroupBox7: TGroupBox;
    radTEMPon: TRadioButton;
    radTEMPoff: TRadioButton;
    GroupBox5: TGroupBox;
    radOVTempOn: TRadioButton;
    radOVTempOff: TRadioButton;
    sedTEMPchannel: TSpinEdit;
    Label1: TLabel;
    Label2: TLabel;
    SpeedButton8: TSpeedButton;
    sedTempRel: TSpinEdit;
    gpbOvervaagningIlt: TGroupBox;
    radOVIltOn: TRadioButton;
    radOVIltOff: TRadioButton;
    gpbReguleringIlt: TGroupBox;
    radILToff: TRadioButton;
    radILTon: TRadioButton;
    sedILTchannel: TSpinEdit;
    lblILTchannel: TLabel;
    lblIltChannelOut: TLabel;
    SpeedButton25: TSpeedButton;
    speOxyAnalog: TSpeedButton;
    edtChOut: TEdit;
    GroupBox15: TGroupBox;
    radMetOn: TRadioButton;
    radMetOff: TRadioButton;
    sedMetRel: TSpinEdit;
    Label9: TLabel;
    Label3: TLabel;
    SpeedButton29: TSpeedButton;
    GroupBox23: TGroupBox;
    radLight_settings_regOf: TRadioButton;
    radLight_settings_regOn: TRadioButton;
    Label8: TLabel;
    Edit1: TEdit;
    Label4: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    SpeedButton30: TSpeedButton;
    grbAlt1Settings_Reg: TGroupBox;
    rbAlt1Settings_RegOff: TRadioButton;
    rbAlt1Settings_RegOn: TRadioButton;
    grbAlt1Settings_Mon: TGroupBox;
    rbAlt1Settings_MonOn: TRadioButton;
    rbAlt1Settings_MonOff: TRadioButton;
    lblAlt1Settings_Input_ch: TLabel;
    sedtAlt1Settings_Input_ch: TSpinEdit;
    sedtAlt1Settings_Output_ch: TSpinEdit;
    lblAlt1Settings_Output_ch: TLabel;
    SpeedButton31: TSpeedButton;
    SpeedButton32: TSpeedButton;
    grbAlt2Settings_Mon: TGroupBox;
    radAlt2Settings_MonOn: TRadioButton;
    radAlt2Settings_MonOff: TRadioButton;
    grbAlt2Settings_Reg: TGroupBox;
    radAlt2Settings_RegOff: TRadioButton;
    radAlt2Settings_RegOn: TRadioButton;
    sedAlt2Settings_Output_ch: TSpinEdit;
    lblAlt2Settings_Output_ch: TLabel;
    sedAlt2Settings_Input_ch: TSpinEdit;
    lblAlt2Settings_Input_ch: TLabel;
    SpeedButton33: TSpeedButton;
    SpeedButton34: TSpeedButton;
    Label24: TLabel;
    edtLight_parameters_CriticalFeed: TEdit;
    lblAlt1Settings_Output_ch2: TLabel;
    sbtnAlt1Settings_Output_ch2Calibration: TSpeedButton;
    edtAlt1Settings_Output_ch2: TEdit;
    lblOpt1_Feedback_parameters_DoseTimeDelay: TLabel;
    edtOpt1_Feedback_parameters_DoseTimedelay: TEdit;
    lblOpt1_Feedback_parameters_DoseSize: TLabel;
    edtOpt1_Feedback_parameters_DoseSize: TEdit;
    edtOpt1_Feedback_parameters_CriticalFeed: TEdit;
    lblOpt1_Feedback_parameters_CriticalFeed: TLabel;
    sbtnAlt2Settings_Output_ch2: TSpeedButton;
    lblAlt2Settings_Output_ch2: TLabel;
    edtAlt2Settings_Output_ch2: TEdit;
    lblOpt2_Feedback_parameters_DoseTimeDelay: TLabel;
    edtOpt2_Feedback_parameters_DoseTimedelay: TEdit;
    lblOpt2_Feedback_parameters_dosesize: TLabel;
    edtOpt2_Feedback_parameters_DoseSize: TEdit;
    grbpH_Calibration_input: TGroupBox;
    Label12: TLabel;
    Label13: TLabel;
    grbpH_Calibration_outputBase: TGroupBox;
    Label14: TLabel;
    Label23: TLabel;
    grbpH_Calibration_outputAcid: TGroupBox;
    Label26: TLabel;
    Label27: TLabel;
    grbTemp_Calibration_input: TGroupBox;
    Label28: TLabel;
    Label29: TLabel;
    grbOxygen_Calibration_input: TGroupBox;
    Label30: TLabel;
    Label31: TLabel;
    grbOxygen_Calibration_output: TGroupBox;
    Label32: TLabel;
    Label33: TLabel;
    grbFeed_Calibration_output: TGroupBox;
    Label36: TLabel;
    Label37: TLabel;
    grbLight_Calibration_output: TGroupBox;
    Label34: TLabel;
    Label35: TLabel;
    grbAlt1_Calibration_input: TGroupBox;
    Label38: TLabel;
    Label39: TLabel;
    grbAlt1_Calibration_Output1: TGroupBox;
    Label40: TLabel;
    Label41: TLabel;
    edtCust1OutH: TEdit;
    edtCust1OutS: TEdit;
    grbAlt2_Calibration_Output1: TGroupBox;
    Label46: TLabel;
    Label47: TLabel;
    edtCust2OutH: TEdit;
    edtCust2OutS: TEdit;
    grbAlt2_Calibration_input: TGroupBox;
    Label48: TLabel;
    Label49: TLabel;
    edtPHhaeldning: TEdit;
    edtPHskaering: TEdit;
    edtTempHaeldning: TEdit;
    edtTempSkaering: TEdit;
    edtIltHaeldning: TEdit;
    edtIltSkaering: TEdit;
    edtRPMhaeldning: TEdit;
    edtRPMskaering: TEdit;
    edtPumpe1haeldning: TEdit;
    edtPumpe1skaering: TEdit;
    edtPumpe2haeldning: TEdit;
    edtPumpe2skaering: TEdit;
    edtPumpe3haeldning: TEdit;
    edtPumpe3skaering: TEdit;
    edtLigthHaeldning: TEdit;
    edtLightSkaering: TEdit;
    edtAlt1Haeldning: TEdit;
    edtAlt1Skaering: TEdit;
    edtAlt2Haeldning: TEdit;
    edtAlt2Skaering: TEdit;
    procedure btnpHClick(Sender: TObject);
    procedure btnTempClick(Sender: TObject);
    procedure btnOxygenClick(Sender: TObject);
    procedure btnFeedClick(Sender: TObject);
    procedure btnLightClick(Sender: TObject);
    procedure btnAlt1Click(Sender: TObject);
    procedure btnAlt2Click(Sender: TObject);
    procedure speOpt1_typeReg_OnOfClick(Sender: TObject);
    procedure speOPt1_typeReg_DoPaClick(Sender: TObject);
    procedure speOpt1_TypeReg_PIDClick(Sender: TObject);
    procedure speOpt1_TypeReg_FeedClick(Sender: TObject);
    procedure speFeedOOClick(Sender: TObject);
    procedure speFeedDPClick(Sender: TObject);
    procedure speOpt2_typereg_onofClick(Sender: TObject);
    procedure speOpt2_typereg_dopaClick(Sender: TObject);
    procedure speOpt2_typereg_PIDClick(Sender: TObject);
    procedure speOpt2_typereg_feedbackClick(Sender: TObject);
    procedure btnOpt2_PID_parameters_advClick(Sender: TObject);
    procedure btnOpt1_PID_AdvSetClick(Sender: TObject);
    procedure btnIltAdvClick(Sender: TObject);
    procedure radLight_settings_regOnClick(Sender: TObject);
    procedure radLight_settings_regOfClick(Sender: TObject);
    procedure gpbOvervaagningPHClick(Sender: TObject);
    procedure sbtnpH_Calibration_inputClick(Sender: TObject);
    procedure SpeedButton9Click(Sender: TObject);
    procedure SpeedButton23Click(Sender: TObject);
    procedure SpeedButton8Click(Sender: TObject);
    procedure SpeedButton25Click(Sender: TObject);
    procedure speOxyAnalogClick(Sender: TObject);
    procedure SpeedButton29Click(Sender: TObject);
    procedure SpeedButton30Click(Sender: TObject);
    procedure SpeedButton31Click(Sender: TObject);
    procedure SpeedButton32Click(Sender: TObject);
    procedure sbtnAlt1Settings_Output_ch2CalibrationClick(Sender: TObject);
    procedure SpeedButton33Click(Sender: TObject);
    procedure SpeedButton34Click(Sender: TObject);
    procedure sbtnAlt2Settings_Output_ch2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmRegulering: TfrmRegulering;

implementation

uses AdvPID_ilt, AdvPID_Opt1, AdvPID_Opt2;

{$R *.dfm}

procedure TfrmRegulering.btnAlt1Click(Sender: TObject);
begin
frmRegulering.gpbPHindstillinger.Visible := false;
frmRegulering.gpbRegpH.Visible := false;
frmRegulering.gpbRegTemp.Visible := false;
frmRegulering.gpbTempSettings.Visible := false;
frmRegulering.gpbFeedSettings.Visible := false;
frmRegulering.gpbRegFeed.Visible := false;
frmRegulering.gpbOxySettings.Visible := false;
frmRegulering.gpbRegOxy.Visible := false;
frmRegulering.gpbLigSettings.Visible := false;
frmRegulering.gpbRegLig.Visible := false;
frmRegulering.gpbRegAlt2.Visible := false;
frmRegulering.gpbAlt2Settings.Visible := false;
frmRegulering.gpbOpt1.Visible := true;
frmRegulering.gpbAlt1Settings.Visible := true;
//Hides calibration eq. panels
frmRegulering.grbpH_Calibration_input.Visible := false;        // ph
frmRegulering.grbpH_Calibration_OutputBase.Visible := false;   // ph
frmRegulering.grbpH_Calibration_OutputAcid.Visible := false;   // ph
frmRegulering.grbTemp_Calibration_input.Visible := false;      // Temp
frmRegulering.grbOxygen_Calibration_input.Visible := false;    // Oxygen
frmRegulering.grbOxygen_Calibration_output.Visible := false;   // Oxygen
frmRegulering.grbFeed_Calibration_output.visible := false;     // Feed
frmRegulering.grbLight_Calibration_output.Visible := false;    // Light
frmRegulering.grbAlt1_Calibration_output1.Visible := false;    // Custom 1
frmRegulering.grbAlt1_Calibration_input.Visible := false;      // Custom 1
frmRegulering.grbAlt2_Calibration_output1.Visible := false;    // Custom 2
frmRegulering.grbAlt2_Calibration_input.Visible := false;      // Custom 2
end;

procedure TfrmRegulering.btnAlt2Click(Sender: TObject);
begin
frmRegulering.gpbPHindstillinger.Visible := false;
frmRegulering.gpbRegpH.Visible := false;
frmRegulering.gpbRegTemp.Visible := false;
frmRegulering.gpbTempSettings.Visible := false;
frmRegulering.gpbFeedSettings.Visible := false;
frmRegulering.gpbRegFeed.Visible := false;
frmRegulering.gpbOxySettings.Visible := false;
frmRegulering.gpbRegOxy.Visible := false;
frmRegulering.gpbLigSettings.Visible := false;
frmRegulering.gpbRegLig.Visible := false;
frmRegulering.gpbAlt2Settings.Visible := true;
frmRegulering.gpbRegAlt2.Visible := true;
frmRegulering.gpbAlt1Settings.Visible := false;
frmRegulering.gpbOpt1.Visible := false;
//Hides calibration eq. panels
frmRegulering.grbpH_Calibration_input.Visible := false;        // ph
frmRegulering.grbpH_Calibration_OutputBase.Visible := false;   // ph
frmRegulering.grbpH_Calibration_OutputAcid.Visible := false;   // ph
frmRegulering.grbTemp_Calibration_input.Visible := false;      // Temp
frmRegulering.grbOxygen_Calibration_input.Visible := false;    // Oxygen
frmRegulering.grbOxygen_Calibration_output.Visible := false;   // Oxygen
frmRegulering.grbFeed_Calibration_output.visible := false;     // Feed
frmRegulering.grbLight_Calibration_output.Visible := false;    // Light
frmRegulering.grbAlt1_Calibration_output1.Visible := false;    // Custom 1
frmRegulering.grbAlt1_Calibration_input.Visible := false;      // Custom 1
frmRegulering.grbAlt2_Calibration_output1.Visible := false;    // Custom 2
frmRegulering.grbAlt2_Calibration_input.Visible := false;      // Custom 2

end;

procedure TfrmRegulering.btnFeedClick(Sender: TObject);
begin
frmRegulering.gpbPHindstillinger.Visible := false;
frmRegulering.gpbRegpH.Visible := false;
frmRegulering.gpbRegTemp.Visible := false;
frmRegulering.gpbTempSettings.Visible := false;
frmRegulering.gpbFeedSettings.Visible := true;
frmRegulering.gpbRegFeed.Visible := true;
frmRegulering.gpbOxySettings.Visible := false;
frmRegulering.gpbRegOxy.Visible := false;
frmRegulering.gpbLigSettings.Visible := false;
frmRegulering.gpbRegLig.Visible := false;
frmRegulering.gpbAlt1Settings.Visible := false;
frmRegulering.gpbAlt2Settings.Visible := false;
frmRegulering.gpbOpt1.Visible := false;
frmRegulering.gpbRegAlt2.Visible := false;
//Hides calibration eq. panels
frmRegulering.grbpH_Calibration_input.Visible := false;        // ph
frmRegulering.grbpH_Calibration_OutputBase.Visible := false;   // ph
frmRegulering.grbpH_Calibration_OutputAcid.Visible := false;   // ph
frmRegulering.grbTemp_Calibration_input.Visible := false;      // Temp
frmRegulering.grbOxygen_Calibration_input.Visible := false;    // Oxygen
frmRegulering.grbOxygen_Calibration_output.Visible := false;   // Oxygen
frmRegulering.grbFeed_Calibration_output.visible := false;     // Feed
frmRegulering.grbLight_Calibration_output.Visible := false;    // Light
frmRegulering.grbAlt1_Calibration_output1.Visible := false;    // Custom 1
frmRegulering.grbAlt1_Calibration_input.Visible := false;      // Custom 1
frmRegulering.grbAlt2_Calibration_output1.Visible := false;    // Custom 2
frmRegulering.grbAlt2_Calibration_input.Visible := false;      // Custom 2
end;

procedure TfrmRegulering.btnIltAdvClick(Sender: TObject);
begin
  frmADVPIDilt.Show;
end;

procedure TfrmRegulering.btnLightClick(Sender: TObject);
begin
frmRegulering.gpbPHindstillinger.Visible := false;
frmRegulering.gpbRegpH.Visible := false;
frmRegulering.gpbRegTemp.Visible := false;
frmRegulering.gpbTempSettings.Visible := false;
frmRegulering.gpbFeedSettings.Visible := false;
frmRegulering.gpbRegFeed.Visible := false;
frmRegulering.gpbOxySettings.Visible := false;
frmRegulering.gpbRegOxy.Visible := false;
frmRegulering.gpbLigSettings.Visible := true;
frmRegulering.gpbRegLig.Visible := true;
frmRegulering.gpbAlt1Settings.Visible := false;
frmRegulering.gpbAlt2Settings.Visible := false;
frmRegulering.gpbOpt1.Visible := false;
frmRegulering.gpbRegAlt2.Visible := false;
//Hides calibration eq. panels
frmRegulering.grbpH_Calibration_input.Visible := false;        // ph
frmRegulering.grbpH_Calibration_OutputBase.Visible := false;   // ph
frmRegulering.grbpH_Calibration_OutputAcid.Visible := false;   // ph
frmRegulering.grbTemp_Calibration_input.Visible := false;      // Temp
frmRegulering.grbOxygen_Calibration_input.Visible := false;    // Oxygen
frmRegulering.grbOxygen_Calibration_output.Visible := false;   // Oxygen
frmRegulering.grbFeed_Calibration_output.visible := false;     // Feed
frmRegulering.grbLight_Calibration_output.Visible := false;    // Light
frmRegulering.grbAlt1_Calibration_output1.Visible := false;    // Custom 1
frmRegulering.grbAlt1_Calibration_input.Visible := false;      // Custom 1
frmRegulering.grbAlt2_Calibration_output1.Visible := false;    // Custom 2
frmRegulering.grbAlt2_Calibration_input.Visible := false;      // Custom 2
end;



procedure TfrmRegulering.btnOpt1_PID_AdvSetClick(Sender: TObject);
begin
   frmAdvPID_Opt1.show;
end;

procedure TfrmRegulering.btnOpt2_PID_parameters_advClick(Sender: TObject);
begin
   frmAdvPID_Opt2.show;
end;

procedure TfrmRegulering.btnOxygenClick(Sender: TObject);
begin
frmRegulering.gpbPHindstillinger.Visible := false;
frmRegulering.gpbRegpH.Visible := false;
frmRegulering.gpbRegTemp.Visible := false;
frmRegulering.gpbTempSettings.Visible := false;
frmRegulering.gpbFeedSettings.Visible := false;
frmRegulering.gpbRegFeed.Visible := false;
frmRegulering.gpbOxySettings.Visible := true;
frmRegulering.gpbRegOxy.Visible := true;
frmRegulering.gpbLigSettings.Visible := false;
frmRegulering.gpbRegLig.Visible := false;
frmRegulering.gpbAlt1Settings.Visible := false;
frmRegulering.gpbAlt2Settings.Visible := false;
frmRegulering.gpbOpt1.Visible := false;
frmRegulering.gpbRegAlt2.Visible := false;
//Hides calibration eq. panels
frmRegulering.grbpH_Calibration_input.Visible := false;        // ph
frmRegulering.grbpH_Calibration_OutputBase.Visible := false;   // ph
frmRegulering.grbpH_Calibration_OutputAcid.Visible := false;   // ph
frmRegulering.grbTemp_Calibration_input.Visible := false;      // Temp
frmRegulering.grbOxygen_Calibration_input.Visible := false;    // Oxygen
frmRegulering.grbOxygen_Calibration_output.Visible := false;   // Oxygen
frmRegulering.grbFeed_Calibration_output.visible := false;     // Feed
frmRegulering.grbLight_Calibration_output.Visible := false;    // Light
frmRegulering.grbAlt1_Calibration_output1.Visible := false;    // Custom 1
frmRegulering.grbAlt1_Calibration_input.Visible := false;      // Custom 1
frmRegulering.grbAlt2_Calibration_output1.Visible := false;    // Custom 2
frmRegulering.grbAlt2_Calibration_input.Visible := false;      // Custom 2
end;

procedure TfrmRegulering.btnpHClick(Sender: TObject);
begin
frmRegulering.gpbPHindstillinger.Visible := true;
frmRegulering.gpbRegpH.Visible := true;
frmRegulering.gpbRegTemp.Visible := false;
frmRegulering.gpbTempSettings.Visible := false;
frmRegulering.gpbFeedSettings.Visible := false;
frmRegulering.gpbRegFeed.Visible := false;
frmRegulering.gpbOxySettings.Visible := false;
frmRegulering.gpbRegOxy.Visible := false;
frmRegulering.gpbLigSettings.Visible := false;
frmRegulering.gpbRegLig.Visible := false;
frmRegulering.gpbAlt1Settings.Visible := false;
frmRegulering.gpbAlt2Settings.Visible := false;
frmRegulering.gpbOpt1.Visible := false;
frmRegulering.gpbRegAlt2.Visible := false;
//Hides calibration eq. panels
frmRegulering.grbpH_Calibration_input.Visible := false;        // ph
frmRegulering.grbpH_Calibration_OutputBase.Visible := false;   // ph
frmRegulering.grbpH_Calibration_OutputAcid.Visible := false;   // ph
frmRegulering.grbTemp_Calibration_input.Visible := false;      // Temp
frmRegulering.grbOxygen_Calibration_input.Visible := false;    // Oxygen
frmRegulering.grbOxygen_Calibration_output.Visible := false;   // Oxygen
frmRegulering.grbFeed_Calibration_output.visible := false;     // Feed
frmRegulering.grbLight_Calibration_output.Visible := false;    // Light
frmRegulering.grbAlt1_Calibration_output1.Visible := false;    // Custom 1
frmRegulering.grbAlt1_Calibration_input.Visible := false;      // Custom 1
frmRegulering.grbAlt2_Calibration_output1.Visible := false;    // Custom 2
frmRegulering.grbAlt2_Calibration_input.Visible := false;      // Custom 2
end;

procedure TfrmRegulering.btnTempClick(Sender: TObject);
begin
frmRegulering.gpbPHindstillinger.Visible := false;
frmRegulering.gpbRegpH.Visible := false;
frmRegulering.gpbRegTemp.Visible := true;
frmRegulering.gpbTempSettings.Visible := true;
frmRegulering.gpbFeedSettings.Visible := false;
frmRegulering.gpbRegFeed.Visible := false;
frmRegulering.gpbOxySettings.Visible := false;
frmRegulering.gpbRegOxy.Visible := false;
frmRegulering.gpbLigSettings.Visible := false;
frmRegulering.gpbRegLig.Visible := false;
frmRegulering.gpbAlt1Settings.Visible := false;
frmRegulering.gpbAlt2Settings.Visible := false;
frmRegulering.gpbOpt1.Visible := false;
frmRegulering.gpbRegAlt2.Visible := false;
//Hides calibration eq. panels
frmRegulering.grbpH_Calibration_input.Visible := false;        // ph
frmRegulering.grbpH_Calibration_OutputBase.Visible := false;   // ph
frmRegulering.grbpH_Calibration_OutputAcid.Visible := false;   // ph
frmRegulering.grbTemp_Calibration_input.Visible := false;      // Temp
frmRegulering.grbOxygen_Calibration_input.Visible := false;    // Oxygen
frmRegulering.grbOxygen_Calibration_output.Visible := false;   // Oxygen
frmRegulering.grbFeed_Calibration_output.visible := false;     // Feed
frmRegulering.grbLight_Calibration_output.Visible := false;    // Light
frmRegulering.grbAlt1_Calibration_output1.Visible := false;    // Custom 1
frmRegulering.grbAlt1_Calibration_input.Visible := false;      // Custom 1
frmRegulering.grbAlt2_Calibration_output1.Visible := false;    // Custom 2
frmRegulering.grbAlt2_Calibration_input.Visible := false;      // Custom 2
end;

procedure TfrmRegulering.gpbOvervaagningPHClick(Sender: TObject);
begin
  if True then

end;

procedure TfrmRegulering.radLight_settings_regOfClick(Sender: TObject);
begin
   frmRegulering.radPHsyreOff.enabled := true;
   frmRegulering.radPHsyreON.enabled := true;
end;

procedure TfrmRegulering.radLight_settings_regOnClick(Sender: TObject);
begin
   frmRegulering.radPHsyreOff.enabled := false;
   frmRegulering.radPHsyreON.enabled := false;
   frmRegulering.radPHsyreOff.Checked := true;
   frmRegulering.radPHsyreON.Checked := false;
end;

procedure TfrmRegulering.speOPt1_typeReg_DoPaClick(Sender: TObject);
begin
   frmRegulering.grbOpt1_DoPa_parameters.visible := true;
   frmRegulering.grbOpt1_DoPa_setpoints .visible := true;
   frmRegulering.grbOpt1_OnOf_parameters.visible := false;
   frmRegulering.grbOpt1_OnOf_setpoints.visible := false;
   frmRegulering.grbOpt1_PID_parameters.visible := false;
   frmRegulering.grbOpt1_PID_setpoint.visible := false;
   frmRegulering.grbOpt1_Feedback_setpoints.Visible := false;
   frmRegulering.grbOpt1_Feedback_parameters.Visible := false;
   frmRegulering.sbtnAlt1Settings_Output_ch2Calibration.Visible := false;
   frmRegulering.edtAlt1Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt1Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt1Settings_Output_ch.Caption := 'Output channel:';
end;

procedure TfrmRegulering.speOpt1_TypeReg_FeedClick(Sender: TObject);
begin
   frmRegulering.grbOpt1_DoPa_parameters.visible := false;
   frmRegulering.grbOpt1_DoPa_setpoints .visible := false;
   frmRegulering.grbOpt1_OnOf_parameters.visible := false;
   frmRegulering.grbOpt1_OnOf_setpoints.visible := false;
   frmRegulering.grbOpt1_PID_parameters.visible := false;
   frmRegulering.grbOpt1_PID_setpoint.visible := false;
   frmRegulering.grbOpt1_Feedback_setpoints.Visible := true;
   frmRegulering.grbOpt1_Feedback_parameters.Visible := true;
   frmRegulering.sbtnAlt1Settings_Output_ch2Calibration.Visible := true;
   frmRegulering.edtAlt1Settings_Output_ch2.Visible := true;
   frmRegulering.lblAlt1Settings_Output_ch2.Visible := true;
   frmRegulering.lblAlt1Settings_Output_ch.Caption := 'Outp. ch. (Reg I):';
end;

procedure TfrmRegulering.speOpt1_typeReg_OnOfClick(Sender: TObject);
begin
   frmRegulering.grbOpt1_DoPa_parameters.visible := false;
   frmRegulering.grbOpt1_DoPa_setpoints .visible := false;
   frmRegulering.grbOpt1_OnOf_parameters.visible := true;
   frmRegulering.grbOpt1_OnOf_setpoints.visible := true;
   frmRegulering.grbOpt1_PID_parameters.visible := false;
   frmRegulering.grbOpt1_PID_setpoint.visible := false;
   frmRegulering.grbOpt1_Feedback_setpoints.Visible := false;
   frmRegulering.grbOpt1_Feedback_parameters.Visible := false;
   frmRegulering.sbtnAlt1Settings_Output_ch2Calibration.Visible := false;
   frmRegulering.edtAlt1Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt1Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt1Settings_Output_ch.Caption := 'Output channel:';
end;

procedure TfrmRegulering.speOpt1_TypeReg_PIDClick(Sender: TObject);
begin
   frmRegulering.grbOpt1_DoPa_parameters.visible := false;
   frmRegulering.grbOpt1_DoPa_setpoints .visible := false;
   frmRegulering.grbOpt1_OnOf_parameters.visible := false;
   frmRegulering.grbOpt1_OnOf_setpoints.visible := false;
   frmRegulering.grbOpt1_PID_parameters.visible := true;
   frmRegulering.grbOpt1_PID_setpoint.visible := true;
   frmRegulering.grbOpt1_Feedback_setpoints.Visible := false;
   frmRegulering.grbOpt1_Feedback_parameters.Visible := false;
   frmRegulering.sbtnAlt1Settings_Output_ch2Calibration.Visible := false;
   frmRegulering.edtAlt1Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt1Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt1Settings_Output_ch.Caption := 'Output channel:';
end;

procedure TfrmRegulering.speOpt2_typereg_dopaClick(Sender: TObject);
begin
   frmRegulering.grbOpt2_onof_setpoints.visible := false;
   frmRegulering.grbOpt2_onof_parameter.visible := false;
   frmRegulering.grbOpt2_dopa_setpoints.visible := true;
   frmRegulering.grbOpt2_dopa_parameters.visible := true;
   frmRegulering.grbOpt2_PID_setpoint.visible := false;
   frmRegulering.grbOpt2_PID_parameters.visible := false;
   frmRegulering.grbOpt2_feedback_setpoint.visible := false;
   frmRegulering.grbOpt2_feedback_parameters.visible := false;
   frmRegulering.lblAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.edtAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.sbtnAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt2Settings_Output_ch.Caption := 'Output channel:';
end;

procedure TfrmRegulering.speOpt2_typereg_feedbackClick(Sender: TObject);
begin
   frmRegulering.grbOpt2_onof_setpoints.visible := false;
   frmRegulering.grbOpt2_onof_parameter.visible := false;
   frmRegulering.grbOpt2_dopa_setpoints.visible := false;
   frmRegulering.grbOpt2_dopa_parameters.visible := false;
   frmRegulering.grbOpt2_PID_setpoint.visible := false;
   frmRegulering.grbOpt2_PID_parameters.visible := false;
   frmRegulering.grbOpt2_feedback_setpoint.visible := true;
   frmRegulering.grbOpt2_feedback_parameters.visible := true;
   frmRegulering.lblAlt2Settings_Output_ch2.Visible := true;
   frmRegulering.edtAlt2Settings_Output_ch2.Visible := true;
   frmRegulering.sbtnAlt2Settings_Output_ch2.Visible := true;
   frmRegulering.lblAlt2Settings_Output_ch.Caption := 'Outp. ch. (Reg I):';
end;

procedure TfrmRegulering.speOpt2_typereg_onofClick(Sender: TObject);
begin
   frmRegulering.grbOpt2_onof_setpoints.visible := true;
   frmRegulering.grbOpt2_onof_parameter.visible := true;
   frmRegulering.grbOpt2_dopa_setpoints.visible := false;
   frmRegulering.grbOpt2_dopa_parameters.visible := false;
   frmRegulering.grbOpt2_PID_setpoint.visible := false;
   frmRegulering.grbOpt2_PID_parameters.visible := false;
   frmRegulering.grbOpt2_feedback_setpoint.visible := false;
   frmRegulering.grbOpt2_feedback_parameters.visible := false;
   frmRegulering.lblAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.edtAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.sbtnAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt2Settings_Output_ch.Caption := 'Output channel:';
end;

procedure TfrmRegulering.speOpt2_typereg_PIDClick(Sender: TObject);
begin
   frmRegulering.grbOpt2_onof_setpoints.visible := false;
   frmRegulering.grbOpt2_onof_parameter.visible := false;
   frmRegulering.grbOpt2_dopa_setpoints.visible := false;
   frmRegulering.grbOpt2_dopa_parameters.visible := false;
   frmRegulering.grbOpt2_PID_setpoint.visible := true;
   frmRegulering.grbOpt2_PID_parameters.visible := true;
   frmRegulering.grbOpt2_feedback_setpoint.visible := false;
   frmRegulering.grbOpt2_feedback_parameters.visible := false;
   frmRegulering.lblAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.edtAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.sbtnAlt2Settings_Output_ch2.Visible := false;
   frmRegulering.lblAlt2Settings_Output_ch.Caption := 'Output channel:';
end;

procedure TfrmRegulering.sbtnAlt1Settings_Output_ch2CalibrationClick(
  Sender: TObject);
begin
  if frmRegulering.grbOxygen_Calibration_output.Visible = false then
    begin
      frmRegulering.grbOxygen_Calibration_output.Visible := true;
      frmRegulering.grbOxygen_Calibration_output.BringToFront;
    end
  else if frmRegulering.grbOxygen_Calibration_output.Visible = true then
      frmRegulering.grbOxygen_Calibration_output.Visible := false;
end;

procedure TfrmRegulering.sbtnAlt2Settings_Output_ch2Click(Sender: TObject);
begin
  if frmRegulering.grbOxygen_Calibration_output.Visible = false then
    begin
      frmRegulering.grbOxygen_Calibration_output.Visible := true;
      frmRegulering.grbOxygen_Calibration_output.BringToFront;
    end
  else if frmRegulering.grbOxygen_Calibration_output.Visible = true then
      frmRegulering.grbOxygen_Calibration_output.Visible := false;
end;

procedure TfrmRegulering.sbtnpH_Calibration_inputClick(Sender: TObject);
begin
  if frmRegulering.grbpH_Calibration_input.Visible = false then
    begin
      frmRegulering.grbpH_Calibration_input.Visible := true;
      frmRegulering.grbpH_Calibration_input.BringToFront;
    end
  else if frmRegulering.grbpH_Calibration_input.Visible = true then
      frmRegulering.grbpH_Calibration_input.Visible := false;
end;

procedure TfrmRegulering.SpeedButton23Click(Sender: TObject);
begin
  if frmRegulering.grbpH_Calibration_outputAcid.Visible = false then
    begin
      frmRegulering.grbpH_Calibration_outputAcid.Visible := true;
      frmRegulering.grbpH_Calibration_outputAcid.BringToFront;
    end
  else if frmRegulering.grbpH_Calibration_outputAcid.Visible = true then
      frmRegulering.grbpH_Calibration_outputAcid.Visible := false;
end;

procedure TfrmRegulering.SpeedButton25Click(Sender: TObject);
begin
  if frmRegulering.grbOxygen_Calibration_input.Visible = false then
    begin
      frmRegulering.grbOxygen_Calibration_input.Visible := true;
      frmRegulering.grbOxygen_Calibration_input.BringToFront;
    end
  else if frmRegulering.grbOxygen_Calibration_input.Visible = true then
      frmRegulering.grbOxygen_Calibration_input.Visible := false;
end;

procedure TfrmRegulering.speOxyAnalogClick(Sender: TObject);
begin
  if frmRegulering.grbOxygen_Calibration_output.Visible = false then
    begin
      frmRegulering.grbOxygen_Calibration_output.Visible := true;
      frmRegulering.grbOxygen_Calibration_output.BringToFront;
    end
  else if frmRegulering.grbOxygen_Calibration_output.Visible = true then
      frmRegulering.grbOxygen_Calibration_output.Visible := false;
end;

procedure TfrmRegulering.SpeedButton29Click(Sender: TObject);
begin
  if frmRegulering.grbFeed_Calibration_output.Visible = false then
    begin
      frmRegulering.grbFeed_Calibration_output.Visible := true;
      frmRegulering.grbFeed_Calibration_output.BringToFront;
    end
  else if frmRegulering.grbFeed_Calibration_output.Visible = true then
      frmRegulering.grbFeed_Calibration_output.visible := false;

end;

procedure TfrmRegulering.SpeedButton30Click(Sender: TObject);
begin
  if frmRegulering.grbLight_Calibration_output.Visible = false then
    begin
      frmRegulering.grbLight_Calibration_output.Visible := true;
      frmRegulering.grbLight_Calibration_output.BringToFront;
    end
  else if frmRegulering.grbLight_Calibration_output.Visible = true then
      frmRegulering.grbLight_Calibration_output.Visible := false;

end;

procedure TfrmRegulering.SpeedButton31Click(Sender: TObject);
begin
  if frmRegulering.grbAlt1_Calibration_input.Visible = false then
    begin
      frmRegulering.grbAlt1_Calibration_input.Visible := true;
      frmRegulering.grbAlt1_Calibration_input.BringToFront;
    end
  else if frmRegulering.grbAlt1_Calibration_input.Visible = true then
      frmRegulering.grbAlt1_Calibration_input.Visible := false;
end;

procedure TfrmRegulering.SpeedButton32Click(Sender: TObject);
begin
  if frmRegulering.grbAlt1_Calibration_output1.Visible = false then
    begin
      frmRegulering.grbAlt1_Calibration_output1.Visible := true;
      frmRegulering.grbAlt1_Calibration_output1.BringToFront;
    end
  else if frmRegulering.grbAlt1_Calibration_output1.Visible = true then
      frmRegulering.grbAlt1_Calibration_output1.Visible := false;
end;

procedure TfrmRegulering.SpeedButton33Click(Sender: TObject);
begin
  if frmRegulering.grbAlt2_Calibration_input.Visible = false then
    begin
      frmRegulering.grbAlt2_Calibration_input.Visible := true;
      frmRegulering.grbAlt2_Calibration_input.BringToFront;
    end
  else if frmRegulering.grbAlt2_Calibration_input.Visible = true then
      frmRegulering.grbAlt2_Calibration_input.Visible := false;
end;

procedure TfrmRegulering.SpeedButton34Click(Sender: TObject);
begin
  if frmRegulering.grbAlt2_Calibration_output1.Visible = false then
    begin
      frmRegulering.grbAlt2_Calibration_output1.Visible := true;
      frmRegulering.grbAlt2_Calibration_output1.BringToFront;
    end
  else if frmRegulering.grbAlt2_Calibration_output1.Visible = true then
      frmRegulering.grbAlt2_Calibration_output1.Visible := false;
end;

procedure TfrmRegulering.SpeedButton8Click(Sender: TObject);
begin
  if frmRegulering.grbTemp_Calibration_input.Visible = false then
    begin
      frmRegulering.grbTemp_Calibration_input.Visible := true;
      frmRegulering.grbTemp_Calibration_input.BringToFront;
    end
  else if frmRegulering.grbTemp_Calibration_input.Visible = true then
      frmRegulering.grbTemp_Calibration_input.Visible := false;
end;

procedure TfrmRegulering.SpeedButton9Click(Sender: TObject);
begin
  if frmRegulering.grbpH_Calibration_outputBase.Visible = false then
    begin
      frmRegulering.grbpH_Calibration_outputBase.Visible := true;
      frmRegulering.grbpH_Calibration_outputBase.BringToFront;
    end
  else if frmRegulering.grbpH_Calibration_outputBase.Visible = true then
      frmRegulering.grbpH_Calibration_outputBase.Visible := false;
end;

procedure TfrmRegulering.speFeedDPClick(Sender: TObject);
begin
  frmRegulering.gpbFeedDPSet.Visible := true;
  frmRegulering.gpbFeedDPA.Visible := true;
  frmRegulering.gpbFeedOOSet.Visible := false;
  frmRegulering.gpbFeedOOA.Visible := false;
end;

procedure TfrmRegulering.speFeedOOClick(Sender: TObject);
begin
  frmRegulering.gpbFeedDPSet.Visible := false;
  frmRegulering.gpbFeedDPA.Visible := false;
  frmRegulering.gpbFeedOOSet.Visible := true;
  frmRegulering.gpbFeedOOA.Visible := true;
end;

end.
